.class public Llt/farmis/libraries/notificationcontroller/utilities/NotificationHelper;
.super Ljava/lang/Object;
.source "NotificationHelper.java"


# direct methods
.method public static getMeaningfulDateFromTimestamp(Landroid/content/Context;J)Ljava/lang/String;
    .locals 4

    .line 159
    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v0

    invoke-static {v0}, Ljava/util/Calendar;->getInstance(Ljava/util/Locale;)Ljava/util/Calendar;

    move-result-object v0

    .line 160
    invoke-virtual {v0, p1, p2}, Ljava/util/Calendar;->setTimeInMillis(J)V

    .line 163
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v1

    sub-long/2addr v1, p1

    const-wide/32 p1, 0x5265c00

    cmp-long v3, v1, p1

    if-gez v3, :cond_0

    .line 178
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide p1

    const/4 v0, 0x1

    invoke-static {p0, p1, p2, v0}, Landroid/text/format/DateUtils;->formatDateTime(Landroid/content/Context;JI)Ljava/lang/String;

    move-result-object p0

    return-object p0

    :cond_0
    const-wide/32 p1, 0x240c8400

    cmp-long v3, v1, p1

    if-gez v3, :cond_1

    const-string p0, "EEE."

    .line 185
    invoke-static {p0, v0}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;Ljava/util/Calendar;)Ljava/lang/CharSequence;

    move-result-object p0

    invoke-interface {p0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object p0

    return-object p0

    :cond_1
    const-wide p1, 0x90321000L

    cmp-long v3, v1, p1

    if-gez v3, :cond_2

    .line 187
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide p1

    const v0, 0x20010

    invoke-static {p0, p1, p2, v0}, Landroid/text/format/DateUtils;->formatDateTime(Landroid/content/Context;JI)Ljava/lang/String;

    move-result-object p0

    return-object p0

    .line 189
    :cond_2
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide p1

    const v0, 0x20014

    invoke-static {p0, p1, p2, v0}, Landroid/text/format/DateUtils;->formatDateTime(Landroid/content/Context;JI)Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method public static makeStyledNotificationInboxLine(Landroid/content/Context;Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)Landroid/text/SpannableString;
    .locals 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(",
            "Landroid/content/Context;",
            "TN;)",
            "Landroid/text/SpannableString;"
        }
    .end annotation

    .line 105
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getWhen()J

    move-result-wide v0

    invoke-static {p0, v0, v1}, Llt/farmis/libraries/notificationcontroller/utilities/NotificationHelper;->getMeaningfulDateFromTimestamp(Landroid/content/Context;J)Ljava/lang/String;

    move-result-object v0

    .line 106
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object v1

    invoke-interface {v1, p0}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getContent(Landroid/content/Context;)Ljava/lang/CharSequence;

    move-result-object v1

    .line 108
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "\u25a0 "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "  "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 110
    new-instance v2, Landroid/text/SpannableStringBuilder;

    invoke-direct {v2, v1}, Landroid/text/SpannableStringBuilder;-><init>(Ljava/lang/CharSequence;)V

    .line 119
    new-instance v1, Landroid/text/style/RelativeSizeSpan;

    const v3, 0x3f4ccccd    # 0.8f

    invoke-direct {v1, v3}, Landroid/text/style/RelativeSizeSpan;-><init>(F)V

    .line 121
    new-instance v3, Landroid/text/style/StyleSpan;

    const/4 v4, 0x1

    invoke-direct {v3, v4}, Landroid/text/style/StyleSpan;-><init>(I)V

    .line 125
    new-instance v5, Landroid/text/style/ForegroundColorSpan;

    const v6, -0xbbbbbc

    invoke-direct {v5, v6}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V

    .line 129
    new-instance v6, Landroid/text/style/ForegroundColorSpan;

    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object p1

    invoke-interface {p1, p0}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getPriorityColor(Landroid/content/Context;)I

    move-result p0

    invoke-direct {v6, p0}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V

    .line 132
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result p0

    add-int/lit8 p0, p0, 0x2

    const/16 p1, 0x12

    invoke-virtual {v2, v1, v4, p0, p1}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V

    .line 133
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result p0

    add-int/lit8 p0, p0, 0x2

    invoke-virtual {v2, v3, v4, p0, p1}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V

    .line 134
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result p0

    add-int/lit8 p0, p0, 0x2

    invoke-virtual {v2, v5, v4, p0, p1}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V

    const/4 p0, 0x0

    .line 135
    invoke-virtual {v2, v6, p0, v4, p1}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V

    .line 138
    invoke-static {v2}, Landroid/text/SpannableString;->valueOf(Ljava/lang/CharSequence;)Landroid/text/SpannableString;

    move-result-object p0

    return-object p0
.end method
